<template>
  <el-dialog
    :title="info.title"
    :visible="visiable"
    :modal="false"
    :modal-append-to-body="false"
    :fullscreen="false"
    class="con-dialog"
    :center="true"
    :width="info.width"
    :top="top"
    :destroy-on-close="destroyOnClose"
    :before-close="closeDialog"
    :custom-class="customClass"
  >
    <slot name="header" slot="title"></slot>
    <slot></slot>
  </el-dialog>
</template>
<script>
export default {
  props: {
    visiable: {
      type: Boolean,
      default: false,
    },
    info:{
        type:Object,
        default:()=>{
            return {
                title:"对话框",
                width:"95%"
            }
        }
    },
    destroyOnClose:{
      type:Boolean,
      default:false
    },
    top:{
      type:String,
      default:"5vh"
    },
    customClass:{
      type:String,
      default:"dialogStyle"
    },
  },
  methods: {
    closeDialog: function() {
      this.$emit("close");
    },
  },
};
</script>